From 3b2127db86eeddbec9dd201494d693c77ae1317f Mon Sep 17 00:00:00 2001 From: Shriram Rajagopalan Date: Mon, 20 Feb 2012 18:34:14 +0000 Subject: [PATCH] remus: libcheckpoint - initialize unused callback fields to NULL Add a memset to the save_callbacks struct instance in libcheckpoint's initialization code. New additions to the callback struct will not need to add an explicit initialization (to NULL), to maintain compatibility with older xend/remus based invocation of xc_domain_save. Signed-off-by: Shriram Rajagopalan Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/python/xen/lowlevel/checkpoint/checkpoint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/python/xen/lowlevel/checkpoint/checkpoint.c b/tools/python/xen/lowlevel/checkpoint/checkpoint.c index 6ffb1676fc..9170778187 100644 --- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c +++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c @@ -155,6 +155,7 @@ static PyObject* pycheckpoint_start(PyObject* obj, PyObject* args) { } else self->checkpoint_cb = NULL; + memset(&callbacks, 0, sizeof(callbacks)); callbacks.suspend = suspend_trampoline; callbacks.postcopy = postcopy_trampoline; callbacks.checkpoint = checkpoint_trampoline; -- 2.30.2